<template>
	<view style="padding:20rpx;">
			<rich-text class="rich-text" :nodes="content"></rich-text>
	</view>
</template>

<style lang="scss" scoped> 
 div{
 	max-width: 700rpx !important;
 }
 .rich-text{
 	width: 750rpx !important;
 	word-break:break-all;
 }
 
</style>
<script> 
	export default {
		data() {
			return {
				content:'',
				id:'',
			}
		},
		onLoad(option) {
			if(option.id){
				this.id  = option.id
				let title = this.id == 1?'使用协议':'隐私政策'
				uni.setNavigationBarTitle({
					title:title
				})
			}
			this.getcontent(this.id)
			
		},
		onPullDownRefresh: function() {
		},
		onReachBottom: function() {
		},
		methods: {
			getcontent(id){
				this.$get({
					url: '/wanlshop/article/details',
					data:{
						id:id
					}
				}).then(res => {
					console.log(res)
					this.content = res.data.content
				})
			}
		}

	}
</script>

